﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Upload_img.aspx.cs" Inherits="systemconfig_Upload_img" %>
    <%@ Register Assembly="Brettle.Web.NeatUpload" Namespace="Brettle.Web.NeatUpload"
    TagPrefix="Upload" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function showadd()
        {
            document.getElementById('ad_img').style.display = "";
        }
        function hid_add()
        {
        document.getElementById('ad_img').style.display = 'none';
        }    
        
        
function isnum()
{
if(event.keyCode<45||event.keyCode>57)
{
event.keyCode=0;
}
}
    </script>
</head>
<body onload="parent.document.getElementById('main').height = document.body.scrollHeight > 920 ?document.body.scrollHeight+10:920;">
    <form id="form1" runat="server">
    
    <div class="Css_add_img" id="ad_img" >
        <ul>
            <li>标题：<span style="padding-left:25px;"><asp:TextBox ID="img_title" runat="server"></asp:TextBox></span>  <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ErrorMessage="标题不能为空" ControlToValidate="img_title" runat="server"></asp:RequiredFieldValidator></li>
              <li style="border-top:0;">索引：<span style="padding-left:25px;"><asp:TextBox ID="order_Index" runat="server" onkeypress="isnum()"></asp:TextBox></span> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ErrorMessage="索引不能为空" ControlToValidate="order_Index" runat="server"></asp:RequiredFieldValidator><span style="color:Red;">(索引为数字，数字越大越靠前)</span>
            </li>
            <li  style="border-top:0;">上传图片：  <Upload:InputFile ID="filename" runat="server"  /><span style="color:Red;">(图片类型只能是.jpg,大小不能超过100kb) </span></li>
            
              
               <li  style="border-top:0;">是否显示：
            <asp:DropDownList ID="show" runat="server">
                <asp:ListItem Value="1">显示</asp:ListItem>
                <asp:ListItem Value="0">不显示</asp:ListItem>
            </asp:DropDownList> </li>
            <li style="border:none;">
                <asp:Button ID="btn_add" runat="server" Width="60px" Text="添加" onclick="btn_add_Click" /></li>
        </ul>
    </div>
    
    <div class="index_img" style="margin-top:10px;">
    <table width=100% cellpadding="0" cellspacing="0" class="td_border">
      <tr>
                            <th>索引</td>
                             <th>图片</td>
                              <th>图片说明</td>
                              <th>显示/隐藏</td>
                               <th>操作</td>
                               
                        </tr>
     <asp:repeater id="imglist" runat="server">
                        <ItemTemplate> 
                      
                        <tr>
                        <td>
                        <%# Eval("img_order")%>
                        </td>
                        <td><img width="100" height="80" src= "..<%# Eval("LuJing")%>" style="border:0;" /></td>
                        <td><%# Eval("font_img")%></td>
                        <td><%# Eval("visible")%></td>
                        <td><a href="editUpload.aspx?id=<%# Eval("Id") %>">编辑</a>&nbsp; &nbsp;|&nbsp; &nbsp;<a href="delUpload.aspx?id=<%# Eval("Id") %>" onclick="return confirm('确定删除吗?')">删除</a></span></td>
                     
                        </tr>               
                        </ItemTemplate>
                    </asp:repeater>
    </table>
        <div style="display:none;"><a href="#" onclick="javascript:showadd();">添加</a></div>
    </div>
    
    
      
    </form>
</body>
</html>
